package com.gxuwz.stats.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxuwz.stats.entity.AchievementTransferScore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AchievementTransferScoreMapper extends BaseMapper<AchievementTransferScore> {
    @Select("SELECT * FROM rsp_achievement_transfer_score WHERE type = #{type} LIMIT 1")
    AchievementTransferScore selectByType(@Param("type") String type);

    @Update("UPDATE rsp_achievement_transfer_score SET score_formula = #{scoreFormula}, variables = #{variables} WHERE type = #{type}")
    int updateFormulaByType(@Param("type") String type, @Param("scoreFormula") String scoreFormula, @Param("variables") String variables);
} 